#include <stdio.h>
#include <unistd.h>

int main(int argc, const char *argv[])
{
    /*** POSIX.1 variables ***/

    /* The maximum length of the arguments to the exec(3) family of functions.  Must not be less than _POSIX_ARG_MAX (4096). */
    printf("ARG_MAX:\t%ld\n", sysconf(_SC_ARG_MAX));

    /*The  maximum  number  of  simultaneous  processes  per  user  ID.   Must not be less than _POSIX_CHILD_MAX (25)*/
    printf("CHILD_MAX:\t%ld\n", sysconf(_SC_CHILD_MAX));

    /*Maximum length of a hostname, not including the terminating null  byte,  as  returned  by gethostname(2).  Must not be less than _POSIX_HOST_NAME_MAX (255)*/
    printf("HOST_NAME_MAX:\t%ld\n", sysconf(_SC_HOST_NAME_MAX));

    /*Maximum  length  of  a login name, including the terminating null byte.  Must not be less than _POSIX_LOGIN_NAME_MAX (9)*/
    printf("LOGIN_NAME_MAX:\t%ld\n", sysconf(_SC_LOGIN_NAME_MAX));

    /*The number of clock ticks per second.*/
    printf("clock_ticks:\t%ld\n", sysconf(_SC_CLK_TCK));

    /*The maximum number of files that a process can have open at any time.  Must not  be  less than _POSIX_OPEN_MAX (20)*/
    printf("OPEN_MAX:\t%ld\n", sysconf(_SC_OPEN_MAX));

    /*Size of a page in bytes.  Must not be less than 1.*/
    printf("PAGESIZE:\t%ld\n", sysconf(_SC_PAGESIZE));

    /*The number of repeated occurrences of a BRE permitted by regexec(3) and regcomp(3).  Must not be less than _POSIX2_RE_DUP_MAX (255).*/
    printf("RE_DUP_MAX:\t%ld\n", sysconf(_SC_RE_DUP_MAX));

    /*The maximum number of streams that a process can have open at any time.  If  defined,  it has  the  same  value  as  the  standard  C  macro  FOPEN_MAX.   Must  not  be  less than _POSIX_STREAM_MAX (8).*/
    printf("STREAM_MAX:\t%ld\n", sysconf(_SC_STREAM_MAX));

    /*The maximum number of symbolic links seen in a pathname before resolution returns  ELOOP. Must not be less than _POSIX_SYMLOOP_MAX (8).*/
    printf("SYMLOOP_MAX:\t%ld\n", sysconf(_SC_SYMLOOP_MAX));

    /*The  maximum  length  of terminal device name, including the terminating null byte.  Must not be less than _POSIX_TTY_NAME_MAX (9).*/
    printf("TTY_NAME_MAX:\t%ld\n", sysconf(_SC_TTY_NAME_MAX));

    /*The maximum number of bytes in a timezone name.  Must not be less than  _POSIX_TZNAME_MAX(6).*/
    printf("TZNAME_MAX:\t%ld\n", sysconf(_SC_TZNAME_MAX));

    /*indicates the year and month the POSIX.1 standard was approved in the format YYYYMML; the value 199009L indicates the Sept. 1990 revision.*/
    printf("_POSIX_VERSION:\t%ld\n", sysconf(_SC_VERSION));

    /*** POSIX.2 variables ***/
    /*indicates the maximum obase value accepted by the bc(1) utility.*/
    printf("BC_BASE_MAX:\t%ld\n", sysconf(_SC_BC_BASE_MAX));

    /*indicates the maximum value of elements permitted in an array by bc(1)*/
    printf("BC_DIM_MAX:\t%ld\n", sysconf(_SC_BC_DIM_MAX));

    /*indicates the maximum scale value allowed by bc(1)*/
    printf("BC_SCALE_MAX:\t%ld\n", sysconf(_SC_BC_SCALE_MAX));

    /*indicates the maximum length of a string accepted by bc(1)*/
    printf("BC_STRING_MAX:\t%ld\n", sysconf(_SC_BC_STRING_MAX));

    /*indicates the maximum numbers of weights that can be assigned to an entry of the  LC_COL‐LATE order keyword in the locale definition file,*/
    printf("COLL_WEIGHTS_MAX:\t%ld\n", sysconf(_SC_COLL_WEIGHTS_MAX));

    /*is the maximum number of expressions which can be nested within parentheses by expr(1)*/
    printf("EXPR_NEST_MAX:\t%ld\n", sysconf(_SC_EXPR_NEST_MAX));

    /*The  maximum length of a utility's input line, either from standard input or from a file. This includes space for a trailing newline.*/
    printf("LINE_MAX:\t%ld\n", sysconf(_SC_LINE_MAX));

    /*The maximum number of repeated occurrences of a  regular  expression  when  the  interval notation \{m,n\} is used.*/
    printf("RE_DUP_MAX:\t%ld\n", sysconf(_SC_RE_DUP_MAX));

    /*indicates the version of the POSIX.2 standard in the format of YYYYMML.*/
    printf("POSIX2_VERSION:\t%ld\n", sysconf(_SC_2_VERSION));

    /*indicates whether the POSIX.2 C language development facilities are supported.*/
    printf("POSIX2_C_DEV:\t%ld\n", sysconf(_SC_2_C_DEV));

    /*indicates whether the POSIX.2 FORTRAN development utilities are supported.*/
    printf("POSIX2_FORT_DEV:\t%ld\n", sysconf(_SC_2_FORT_DEV));

    /*indicates whether the POSIX.2 FORTRAN run-time utilities are supported.*/
    printf("POSIX2_FORT_RUN:\t%ld\n", sysconf(_SC_2_FORT_RUN));

    /*indicates whether the POSIX.2 creation of locates via localedef(1) is supported.*/
    printf("_POSIX2_LOCALEDEF:\t%ld\n", sysconf(_SC_2_LOCALEDEF));

    /*indicates whether the POSIX.2 software development utilities option is supported.*/
    printf("POSIX2_SW_DEV:\t%ld\n", sysconf(_SC_2_SW_DEV));

    return 0;
}
